﻿using GameView.Comment;
using GameView.Models;
using GameView.Services.Dtos.Blacklist;

namespace GameView.Services
{
    public class BlacklistService
    {
        public async Task<ApiResponse<List<BlacklistShowModel>>> GetListAsync()
        {
            var res = await $"{APIHelper.Blacklist}/list".GetAsync<List<BlacklistShowModel>, object>();
            return res;
        }
        public async Task<ApiResponse<int>> BatchDelete(List<int> queryDto)
        {
            var res = await $"{APIHelper.Blacklist}/batch-delete".DeleteData<List<int>>(queryDto);
            return res;
        }
        public async Task<ApiResponse<BlacklistShowModel>> Add(BlacklistAddDto queryDto)
        {
            var res = await $"{APIHelper.Blacklist}".AddNewAsync<BlacklistAddDto, BlacklistShowModel>(queryDto);
            return res;
        }
    }
}